<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');

class login_model extends CI_Model {

    public function validate() {

        $this->db->where('username', $this->input->post('username'));
        $this->db->where('password', md5($this->input->post('password')));
        $query = $this->db->get('users');

        if ($query->num_rows == 1) {
            return true;
        }
    }
}

/* End of file welcome.php */
/* Location: ./application/controllers/welcome.php */